-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
docs: add missing type information #13928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice — even though it's marked 'draft', I'm going to go ahead and merge this since it includes some nice fixes
This PR adds missing type information to several code blocks with the benefit being that users get type information on hover and we get validation when building the app. It also inlines the type information for the service worker example so that it's easier to copy and paste for new projects (it provides a js/ts toggle too where there previously was none https://svelte.dev/docs/kit/service-workers#Inside-the-service-worker).
EDIT: this PR should be merged before sveltejs/svelte.dev#1398 which ensures TypeScript info is correct in the docs
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits